<template>
  <view class="content">
    <text class="title">子组件A</text>
    <view class="coma_box">
      <text>父组件传进来的值：</text>
      <text class="value-text">{{ intent }}</text>
    </view>
    <button type="primary" @click="sendData()">传值给CompB组件</button>
  </view>
</template>

<script>
	export default {
		name:"ComAView",
		props: ['intent'], 
		data() {
			return {
				
			};
		},
		methods:{
			sendData() {
			  console.warn("---ComAView---sendData----->" + this.intent);
			  uni.$emit('getIntent', this.intent);
			}
		}
	}
</script>

<style>
.content {
  padding: 20rpx;
  text-align: center;
}

.title {
  font-size: 50rpx;
  margin-bottom: 20rpx;
}

.coma_box {
  background-color: #00ffff;
  padding: 20rpx;
  border-radius: 10rpx;
  margin-bottom: 20rpx;
}

.value-text {
  font-weight: bold;
  color: red;
  font-size: 32rpx;
}
</style>